package com.ruoyi.web.controller.app;


import com.ruoyi.business.domain.WmsInWarehousDetail;
import com.ruoyi.business.service.IWmsInWarehousDetailService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 库存查询 Controller
 *
 * @author yunlong
 * 2021-12-25 20:10:19
 */
@RestController
@RequestMapping("/app/stock")
@Api(tags = "库存查询")
@Slf4j
public class StockController extends BaseController {

    @Autowired
    private IWmsInWarehousDetailService wmsInWarehousDetailService;


    /**
     * @Description: 查询货物的所有批次号
     * @author yunlong
     */
    @ApiOperation(value = "查询货物的所有批次号")
    @GetMapping("getBatchNumberList")
    @CrossOrigin
    public AjaxResult getBatchNumberList(WmsInWarehousDetail info) {
        List<Map<String,Object>> list = wmsInWarehousDetailService.queryCargoList(info.getCargoSn());
        return AjaxResult.success(list);
    }
}
